#! /usr/bin/env python

import socket

def SendMessage(INPUTS : start, message, portNumber, hostname):
  print 'Sending message:',message
  print 'To port:',portNumber
  sock=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  sock.connect((hostname, portNumber))
  msgLength=str(len(message))
  blankLength=1024-len(msgLength)
  sock.send(msgLength+' '*blankLength)
  sock.send(message)
  sock.close()
